﻿@model SalePromotion.Models.LogOnModel
@{
    ViewBag.Title = "FetchToken";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>
    FetchToken</h2>
<div>
    <fieldset>
        <legend>Account Information</legend>
        <div class="displayDiv">
            <span>User Name:</span>
        </div>
        <div class="displayDiv">
            <span>
                @HttpContext.Current.User.Identity.Name</span>
        </div>
        <div class="clear">
        </div>
        <div class="displayDiv">
            <span>Status:</span>
        </div>
        <div class="displayDiv">
            <span style="font-weight: bold">
                @Model.ActiveText
            </span>
        </div>
        <div class="clear">
        </div>
        <div class="displayDiv">
            <input class="btn" id="activate" type="button" value="Activate" />
        </div>
        <div class="displayDiv">
            @using (Html.BeginForm())
            {
                <input class="btn" type="submit" value="Fetch Token" />
            }
        </div>
        <div class="clear">
        </div>
    </fieldset>
</div>
@section Scripts{
    <script type="text/javascript">

        $(function () {
            $("input#activate").click(function (e) {
                window.open('Activate', 'Activate and fetch tokens', 'height=700, width=980, top=40, left=40, toolbar=no, menubar=no, scrollbars=no,resizable=no,location=no, status=no');

            });

        });
    </script>
}
